package cn.JHai.rbac.domain;

import java.util.Objects;

public class Permission {
    private Long id;

    private String name;

    private String expression;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    @Override
    public String toString() {
        return "Permission{" +
                "name='" + name + '\'' +
                ", expression='" + expression + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        //if (this == o) return true;
        if (o == null) return false;
        Permission that = (Permission) o;
        return  Objects.equals(name, that.name) &&
                Objects.equals(expression, that.expression);
    }


}